/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package be.ua.ac.comp.projectGPT.auctionPolicies;

import be.ac.ua.comp.projectGPT.exceptions.InitializationException;

/**
 * Implementation for an auction policy on which the auction depends.
 * The auction will end when no new biddings are received.
 */
public class BiddingStopPolicy extends AuctionPolicy {

    public boolean stop() throws InitializationException {
        if(!initialized) {
            throw new InitializationException();
        }
            return (auction.getBiddings() > 0);
    }

    @Override
    public void start() throws InitializationException {
        if(!initialized) {
            throw new InitializationException();
        }
        logger.info("Starting");
    }

}
